/**
 * @filename:DirectoryInfo 2025-04-27
 * @project starhub-schema  V1.0
 */
package com.starhub.engine.directory.entity;

import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.io.Serializable;

import lombok.Data;

import java.util.ArrayList;
import java.util.Date;
import java.util.List;

/**   
 * @Description:(附件目录管理实体类)
 * @version: V1.0
 * @author: 孙赛赛-sss
 */
@Data
@ApiModel
@JsonInclude(JsonInclude.Include.NON_NULL)
@JsonIgnoreProperties(ignoreUnknown = true)
public class DirectoryInfo implements Serializable {

	private static final long serialVersionUID = 1745719524722L;
	
    @JsonSerialize(using = ToStringSerializer.class)
	@ApiModelProperty(name = "id" , value = "")
	private Long id;
    
	@ApiModelProperty(name = "name" , value = "")
	private String name;
    
    @JsonSerialize(using = ToStringSerializer.class)
	@ApiModelProperty(name = "parentId" , value = "")
	private Long parentId;
    
	@ApiModelProperty(name = "directoryPath" , value = "")
	private String directoryPath;
    
    @JsonSerialize(using = ToStringSerializer.class)
	@ApiModelProperty(name = "userId" , value = "")
	private Long userId;
    
	@ApiModelProperty(name = "createDateTime" , value = "")
	private Date createDateTime;

	private List<DirectoryInfo> children;

	public void addChild(DirectoryInfo child) {
		this.children.add(child);
	}
}
